package com.kantboot.business.water.domain.entity;


import com.kantboot.util.core.jpa.KantbootGenerationType;
import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 会员
 */
@Entity
@Getter
@Setter
@Table(name = "bus_water_vip")
@Accessors(chain = true)
@EntityListeners(AuditingEntityListener.class)
@DynamicUpdate
@DynamicInsert
public class BusWaterVip implements Serializable {

    /**
     * 主键
     */
    @Id
    @GenericGenerator(name = "snowflakeId", strategy = KantbootGenerationType.SNOWFLAKE)
    @GeneratedValue(generator = "snowflakeId")
    @Column(name = "id")
    private Long id;

    /**
     * 会员名称
     */
    @Column(name = "t_name", length = 64)
    private String name;

    /**
     * 会员描述
     */
    @Column(name = "t_description", length = 64)
    private String description;

    /**
     * 会员图标
     */
    @Column(name = "file_id_of_image")
    private Long fileIdOfImage;

    /**
     * 每月权益消费额度
     */
    @Column(name = "t_monthly_quota", length = 64)
    private BigDecimal monthlyQuota;

    /**
     * 会员等级折扣
     */
    @Column(name = "t_discount", length = 64)
    private BigDecimal discount;

    /**
     * 会员权益达到此等级需消费额度
     */
    @Column(name = "t_need_quota", length = 64)
    private BigDecimal needQuota;


}
